.PHONY: install
install:
	uv pip install -e .

.PHONY: install-dev
install-dev:
	uv pip install -e .[dev]
	pre-commit install

.PHONY: type
type:
	SKIP=no-commit-to-branch pre-commit run -a pyright

.PHONY: format
format:
	# Fix all autofixable problems (which sorts imports) then format errors
	SKIP=no-commit-to-branch pre-commit run -a ruff-lint
	SKIP=no-commit-to-branch pre-commit run -a ruff-format

.PHONY: check
check:
	SKIP=no-commit-to-branch pre-commit run -a --hook-stage commit

.PHONY: test
test:
	uv run python -m pytest

.PHONY: test-all
test-all:
	uv run python -m pytest --runslow

.PHONY: serve-results
serve-results:
	uv run python -m http.server --directory results

.PHONY: deploy-test
deploy-test:
	bash deploy.sh pytest --runslow --durations=8
